package com.sl.hx.shop.ui.home.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sl.hx.shop.R;
import com.sl.hx.shop.bean.CentralNavigationList;
import com.sl.hx.shop.bean.CollectGoodsBean;

import java.util.List;

public class CentraNavigationAdapter extends BaseQuickAdapter<CentralNavigationList,BaseViewHolder> {

    public CentraNavigationAdapter(@Nullable List<CentralNavigationList> data) {
        super(R.layout.item_centranavigation,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, CentralNavigationList item) {
        ImageView icon = helper.getView(R.id.icon);
        Glide.with(mContext).load(item.getLogo()).apply(RequestOptions.placeholderOf(R.drawable.home_bitmap)).into(icon);
        helper.setText(R.id.name,item.getName());
    }
}
